/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cip.esymons.tesoreria.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class CuotaFraccionamientoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "fk_fra_codigo", nullable = false)
    private long fkFraCodigo;
    @Basic(optional = false)
    @Column(name = "cfr_codigo", nullable = false)
    private long cfrCodigo;

    public CuotaFraccionamientoPK() {
    }

    public CuotaFraccionamientoPK(long fkFraCodigo, long cfrCodigo) {
        this.fkFraCodigo = fkFraCodigo;
        this.cfrCodigo = cfrCodigo;
    }

    public long getFkFraCodigo() {
        return fkFraCodigo;
    }

    public void setFkFraCodigo(long fkFraCodigo) {
        this.fkFraCodigo = fkFraCodigo;
    }

    public long getCfrCodigo() {
        return cfrCodigo;
    }

    public void setCfrCodigo(long cfrCodigo) {
        this.cfrCodigo = cfrCodigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fkFraCodigo;
        hash += (int) cfrCodigo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CuotaFraccionamientoPK)) {
            return false;
        }
        CuotaFraccionamientoPK other = (CuotaFraccionamientoPK) object;
        if (this.fkFraCodigo != other.fkFraCodigo) {
            return false;
        }
        if (this.cfrCodigo != other.cfrCodigo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.cip.esymons.tesoreria.be.CuotaFraccionamientoPK[fkFraCodigo=" + fkFraCodigo + ", cfrCodigo=" + cfrCodigo + "]";
    }

}
